Schedule Trigger

Process Watcher

See Also

Introduction to Triggers, Available Triggers

Description

Launches task when the specified process starts, ends or stops responding. To indicate partial process names, use wildcard characters * and ?.

Practical Usage

Frequently used to monitor external applications for unexpected crashes. Process watcher is also used to start a task when an external application starts.

Parameters

General Tab

Wait for process to

Specifies the time based interval on which the schedule will be based. If the task should run every day, select days, the task should run monthly - select months.

The available options are:

Stop responding: The task will run when the specified process stops responding or "hangs".

Start: The task will run when the specified process is started.

End: The task will run when the process ends.

Process Name

Specifies the process to watch. Either a filename or a full path and filename may be used. The wildcard characters * and ? may be used, for example e*.exe would watch for all processes starting with the letter e.

Counter Tab

Trigger after condition has been met

Specifies how many times the trigger condition must be met before the task is started. The default is 1. This parameter is available in all triggers except Schedule Watcher.

Trigger Parameters

When this trigger is activated - it automatically populates the AMTrigger object to the task.

The following properties are populated:

Standard Parameters

Parameters available in all triggers.

AMTrigger.Trigger
Text
The name of the trigger that started the task.  For this trigger, the value is set to "AMPROCESSTRIGGER".
AMTrigger.TaskName
Text
The name of the managed task that the trigger was attached to .  This is useful to determine the responsible task when two managed tasks point to the same AML file.
AMTrigger.TriggeredOn
Text
The name of the computer that the task was triggered on.

Trigger-Specific Parameters

Parameters available only in this trigger.

AMTrigger.Action
Text

Specifies the type of wait that the trigger used.

The available returns are:

START: The trigger was set to wait for the process to start.

END: The trigger was set to wait for the process to end.

HUNG: The trigger was set to wait for the process to stop responding

AMTrigger.Exename
Text

Returns the filename of the process that triggered the task including path and filename information.

AMTrigger.Filename
Text

Returns the filename of the process that triggered the task without path information.

AMTrigger.ProcessID
Number

Returns the process ID of the process that triggered the task. A process ID is a number automatically assigned to a process by Windows. The process ID can be used by other actions in AutoMate to specify an instance of an application.